if (($_isopen(@Account) == $true) || (n isin $1)) ecfg
}
alias _esaveacc {
set %.cfg EMail $+ $1
set %email.pu [ $+ [ $1 ] ] $1. %email.account
_writemailc %.cfg name %email.account
_writemailc %.cfg smtp %email.smtp
_writemailc %.cfg pop3 %email.pop3
_writemailc %.cfg user %email.user
_writemailc %.cfg pw %email.pw
_writemailc %.cfg addr %email.email
_writemailc %.cfg reply %email.replyto
_writemailc %.cfg who %email.ffrom
_writemailc %.cfg org %email.org
_writemailc %.cfg sig %email.sig
_writemailc %.cfg cret %email.cret
_writemailc %.cfg wrap %email.wrap
_writemailc %.cfg ccsend %email.fastsend
_writemailc %.cfg auto %email.autocheck
}
alias _eloadacc {
set %.cfg EMail $+ $1
set %email.accnum $1
set %email.account $_mailcfg(%.cfg,name)
set %email.curr Current- %email.accnum $+ . %email.account
set %email.smtp $_mailcfg(%.cfg,smtp)
set %email.pop3 $_mailcfg(%.cfg,pop3)
set %email.user $_mailcfg(%.cfg,user)
set %email.pw $_mailcfg(%.cfg,pw)
set %email.email $_mailcfg(%.cfg,addr)
set %email.replyto $_mailcfg(%.cfg,reply)
set %email.ffrom $_mailcfg(%.cfg,who)
set %email.org $_mailcfg(%.cfg,org)
set %email.sig $_mailcfg(%.cfg,sig)
set %email.cret $_mailcfg(%.cfg,cret)
set %email.wrap $_mailcfg(%.cfg,wrap)
set %email.fastsend $_mailcfg(%.cfg,ccsend)
set %email.autocheck $_mailcfg(%.cfg,auto)
}
alias email {
if ($left($1,2) isin cfcose) ecfg $2-
elseif ($left($1,2) == ac) eacc $2-
elseif ($left($1,1) isin snme) esend $2-
elseif ($left($1,1) isin ab) ebook
else echeck
}
menu menubar {
-
E-Mail
.Check...:echeck
.Compose new...:esend
.Address book...:ebook
.-
.Account
..%email.curr:eacc %email.accnum
..-
..%email.pu1:eacc 1
..%email.pu2:eacc 2
..%email.pu3:eacc 3
..%email.pu4:eacc 4
..%email.pu5:eacc 5
..%email.pu6:eacc 6
..%email.pu7:eacc 7
..%email.pu8:eacc 8
..%email.pu9:eacc 9
..-
..New account...:eacc n
..Delete current
...Yes I'm sure:eacc d
..Rename current...:set %_arhelp ecfg n | _askr _arhelp New name for account %email.accnum $+ ?
.Configure...:ecfg
.Auto check
..When
...$_dynpop($_if( [ %email.auto.when ] == off)) Disable:set %email.auto.when off | disp E-Mail auto check disabled.
...$_dynpop($_if( [ %email.auto.when ] == away)) Only when away:set %email.auto.when away | disp E-Mail auto check will only occur when you are away.
...$_dynpop($_if( [ %email.auto.when ] == here)) Only when here:set %email.auto.when here | disp E-Mail auto check will only occur when you are not away.
...$_dynpop($_if( [ %email.auto.when ] == on)) Anytime:set %email.auto.when on | disp E-Mail auto check enabled. (will occur whether you are away or not)
..Frequency
...Currently every %email.auto.freq minutes:disp E-Mail auto check occurs every %email.auto.freq minutes.
...-
...Every 5 minutes:_acsfreq 5
...Every 10 minutes:_acsfreq 10
...Every 15 minutes:_acsfreq 15
...Every 20 minutes:_acsfreq 20
...Every X minutes...:_askr _acsfreq Number of minutes between e-mail checks?
..Only if idle
...Currently must idle %email.auto.idle %email.auto.idlet:disp E-Mail auto check only occurs if you are idle %email.auto.idle %email.auto.idlet or more.
...-
...Idle 0 seconds:_acsidle 0 s
...Idle 15 seconds:_acsidle 15 s
...Idle 30 seconds:_acsidle 30 s
...Idle 60 seconds:_acsidle 60 s
...Idle 5 minutes:_acsidle 5
...Idle 10 minutes:_acsidle 10
...Idle X minutes...:_askr _acsidle Number of minutes you must idle before e-mail check will occur?
..Account
...$_dynpop($_if( [ %email.auto.acc ] == curr)) Current only:set %email.auto.acc curr | disp E-Mail auto check will only check the currently loaded account. (assuming auto check is on for that account)
...$_dynpop($_if( [ %email.auto.acc ] == all)) All accounts:set %email.auto.acc all | disp E-Mail auto check will check all accounts that have auto check enabled.
...$_dynpop($_if( [ %email.auto.acc ] == cycle)) Current, then load next:set %email.auto.acc cycle | disp E-Mail auto check will check the currently loaded account, then load the next account (in order) that has auto check enabled.
..If found
...$_dynpop($_if( [ %email.auto.do ] == tb)) Show in titlebar:set %email.auto.do tb | disp If e-mail is detected, a count of new messages will be shown in the mIRC titlebar.
...$_dynpop($_if( [ %email.auto.do ] == note)) Display note:set %email.auto.do note | disp If e-mail is detected, a note will be displayed in the active window.
...$_dynpop($_if( [ %email.auto.do ] == win)) Popup window:set %email.auto.do win | disp If e-mail is detected, the e-mail window will be displayed.
...$_dynpop($_if( [ %email.auto.do ] == get)) Get headers:set %email.auto.do get | disp If e-mail is detected, the e-mail window will be displayed and the e-mail headers will be downloaded.
..-
..Defaults (on):set %email.auto.when on | set %email.auto.freq 10 | set %email.auto.idle 0 | set %email.auto.acc curr | set %email.auto.do tb | disp Automatic e-mail checks enabled with default behavior.
.-
.Get mail
..$_dynpop(%email.get.reverse) in reverse order:dispa Mail will be downloaded in "reverse" order, so the OLDEST message will be displayed on top. | set %email.get.reverse $true
..$_dynpop($_not(%email.get.reverse)) in normal order:dispa Mail will be downloaded in "normal" order, so the NEWEST message will be displayed on top. | set %email.get.reverse $false
..-
..$_dynpop($_not(%email.get.min)) normal window:dispa Mail windows will open normally, as they are downloaded | set %email.get.min $false
..$_dynpop(%email.get.min) minimized:dispa Mail windows will be minimized as you receive them, for you to restore manually yourself | set %email.get.min $true
.-
.Help:help ! e-mail system
}
alias _acsfreq set %email.auto.freq $1 | disp E-Mail auto check will occur every %email.auto.freq minutes. | _acstimer
alias _acsidle set %email.auto.idle $1 | if ($2 == s) set %email.auto.idlet seconds | else set %email.auto.idlet minutes | disp E-Mail auto check will only occur if you are idle %email.auto.idle %email.auto.idlet or more.
on 1:start:_acstimer
alias _acstimer if (%email.auto.freq > 0) .timer915 -o 1 $calc(%email.auto.freq * 60) _acsdo
alias _acstimerq if (%email.auto.freq > 0) .timer915 -o 1 $calc(%email.auto.freq * 20) _acsdo
alias _acsdo {
if (%email.auto.when == off) { _acstimer | return }